<template>
  <div>
    <a-card :bordered="false">
      <f-table ref="table" rowKey="reportOutThreeId" :columns="columns" :scroll="{x:newColumns.length*150,y:newColumns.length*35}"
               :multiple="false" :operator="operator"
               :params="queryParam" :api="api.reportOut3">
      </f-table>
    </a-card>
  </div>
</template>
<script>
  import api from './js/api'

  export default {
    name: 'reportOut3Detail',
    props: {
      detailsParams: {}
    },
    data() {
      let me = this
      //操作按钮
      let operator = []
      return {
        api: Object.assign(api, this.api),
        //列表初始化查询参数
        queryParam: {},
        // 表头
        columns: [
          {
            title: '序号',
            width: 100,
            align: 'center',
            customRender: (text, record, index) => index + 1
          },
          {
            title: '备用',
            align: 'center',
            width: 150,
            dataIndex: 'otherField1'
          },
          {
            title: '项目编码',
            align: 'center',
            width: 150,
            dataIndex: 'projectCode'
          },
          {
            title: '项目名称',
            align: 'center',
            width: 150,
            dataIndex: 'projectName'
          },
          {
            title: '年月',
            align: 'center',
            width: 150,
            dataIndex: 'reportMonth'
          },
          {
            title: '批次',
            align: 'center',
            width: 150,
            dataIndex: 'batchNumber'
          },
          {
            title: '项目特征描述',
            align: 'center',
            width: 200,
            dataIndex: 'projectDesc'
          },
          {
            title: '尺寸',
            align: 'center',
            width: 100,
            dataIndex: 'size'
          },
          {
            title: '计量单位',
            align: 'center',
            width: 100,
            dataIndex: 'measuringUnit'
          },
          {
            title: '工程量',
            align: 'center',
            width: 150,
            dataIndex: 'quantities'
          },
          {
            title: '金额(元)',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '综合单价',
                align: 'center',
                width: 150,
                dataIndex: 'syntheticalPrice'
              },
              {
                title: '合价',
                align: 'center',
                width: 150,
                dataIndex: 'sumPrice'
              }
            ]
          },
          {
            title: '累计申请',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '工程量',
                align: 'center',
                width: 150,
                dataIndex: 'sumApplyQuantities'
              },
              {
                title: '合价金额(元)',
                align: 'center',
                width: 150,
                dataIndex: 'sumApplyAmount'
              }
            ]
          },
          {
            title: '本次申请',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '工程量',
                align: 'center',
                width: 150,
                dataIndex: 'theApplyQuantities'
              },
              {
                title: '合价金额(元)',
                align: 'center',
                width: 150,
                dataIndex: 'theApplyAmount'
              }
            ]
          },
          {
            title: '管理公司审核',
            align: 'center',
            width: 150,
            dataIndex: '',
            children: [
              {
                title: '工程量',
                align: 'center',
                width: 150,
                dataIndex: 'checkQuantities'
              },
              {
                title: '合价金额(元)',
                align: 'center',
                width: 150,
                dataIndex: 'checkAmount'
              }
            ]
          },
          {
            title: '操作',
            align: 'center',
            width: 150,
            scopedSlots: { customRender: 'action' },
            fixed: 'right'
          }
        ],
        operator: operator
      }
    },
    created() {
      this.queryParam.projectCode = this.$route.query.projectCode
      this.queryParam.reportMonth = this.$route.query.reportMonth
      this.queryParam.batchNumber = this.$route.query.batchNumber
    },
    methods: {
    }
  }
</script>
